<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>开通会员</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/order/css/result.css"/>
    <script type="text/javascript" src="__TMPL__/public/order/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="__TMPL__/public/assets/js/layer/mobile/layer.js"></script>
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/css/mobileSelect.css"/>
    <script src="__TMPL__/public/assets/js/mobileSelect.min.js"></script>
    <style>
        .test{background-image: url(__TMPL__/public/assets/images/icon2.png);background-size: 400px;background-repeat: no-repeat;background-position-y: 10px;background-position-x: 8px;background-color: #fff;}
        .halfyear{background-image: url(__TMPL__/public/assets/images/icon2.png);background-size: 420px;background-repeat: no-repeat;background-position-y: 12px;background-position-x: -125px;background-color: #fff;}
        .year{background-image: url(__TMPL__/public/assets/images/icon2.png);background-size: 420px;background-repeat: no-repeat;background-position-y: 10px;background-position-x: -255px;background-color: #fff;}
        .year2{background-image: url(__TMPL__/public/assets/images/icon2.png);background-size: 420px;background-repeat: no-repeat;background-position-y: 10px;background-position-x: -387px;background-color: #fff;}
        .imgdiv{margin: 10px 10px;width: 40px;height: 40px;border-radius: 50%;padding: 0!important;float: left;}
        .shops div p{margin: 3px 0!important;}
        .connet{background: #F5F5F5;margin: 12px 0 0 0;font-size: 16px;}
        .connet img{width:100%;height:auto}
        .tip{padding: 13px 4% 10px;background: #fff;float: left;    margin-top: 10px;}
        .top_tip{float: left;width: 100%;}
        .top_tip img{width: 22px;margin-top: 12px;display: block;float: left}
        .top_tip span{margin: 17px 0 0 12px;display: block;float: left;font-weight: bold;font-size: 16px;}
        .tip_content{float: left;width: 100%;margin-top: 5px;}
        .tip_content ul li{list-style: none;font-size: 14px;color: #999;line-height: 28px;}
        .tip_content ul li em{font-style: normal;background: #999;color: #fff;padding: 3px;border-radius: 15px;width: 14px;height: 14px;display: block;text-align: center;line-height: 15px;float: left;margin-right: 10px;margin-top: 3px;font-size: 12px;}
    </style>
</head>
<body>
<header>
    <div class="content"  style="border-bottom: 1px solid rgba(215, 215, 215, 0.29);">
        <a href="/"></a>
        <a>开通会员</a>
        <a href="javacript:;"></a>
    </div>
</header>

<div class="shops" style=" background: linear-gradient(to right, #bd9840 , #f4e395);box-shadow: 0px 5px 10px #f4e8cc;margin-top: 0;overflow: auto;color: #fff;">
     <div>
         <php>
             if($info['type']==1){
                $class="test";
                $name="体验卡";
                $end_time=date('Y-m-d',strtotime("+1 week"));
                 $article_id=3;
             }
             if($info['type']==2){
                $class="halfyear";
                $name="半年卡";
                $end_time=date('Y-m-d',strtotime("+6 month"));
           		$article_id=4;
             }
             if($info['type']==3){
                 $class="year";
                 $name="年卡";
                 $end_time=date('Y-m-d',strtotime("+12 month"));
                 $article_id=5;
             }
             if($info['type']==4){
                 $class="year2";
                 $name="家庭股东年卡";
                 $end_time=date('Y-m-d',strtotime("+12 month"));
                 $article_id=6;
             }
         </php>
         <div class="imgdiv {$class}"></div>

        <p>{$name}【{$info.store_name}】</p>
        <p><span style="color: #fff;">￥<b>{$info.price}</b></span></p>
     </div>
</div>
<php>$article=cmf_get_article($article_id,2);</php>
  <div class="connet">
      <p style="border-left: 3px solid #CC9C2D;color:  #CC9C2D;padding-left:  6px;font-weight:  800;display:  block;width:  85%;height: 19px;margin-bottom:  5px;margin-left: 15px;line-height: 19px;">{$name}</p>
    {$article.post_content}
    </div>

<div class="tip">
    <div class="top_tip">
        <img src="__TMPL__/public/user/image/guize.png" alt="">
        <span>使用规则</span>
    </div>
    <div class="tip_content">
        <ul>
       <php>if($info['type']==1){</php> 
					<li><em>1</em>会员只仅限本人使用；</li>
                    <li><em>2</em>开卡次曰起连续7天、过期作废！</li>
                    <li><em>3</em>不可找零、不可提现！</li>
                    <li><em>4</em>解释权规公司所有!</li>
				<php>}</php>
                <php>if($info['type']==2){</php> 
					<li><em>1</em>会员只仅限本人使用；</li>					
              		<li><em>2</em>怀孕、搬家等特殊请况可和门店申请延长时间，最多2个月！</li>
					<li><em>3</em>会员卡不许转售、退还！</li>
					<li><em>4</em>该门店如果不经营需提前1个月通知会员、并按排退款！退款金额按实付金额除以6个月、再乘以所剩时间的6折退还！</li>					
				<php>}</php>
               <php>if($info['type']==3){</php> 
					<li><em>1</em>会员只仅限本人使用；</li>					
              		<li><em>2</em>怀孕、搬家等特殊请况可和门店申请延长时间，最多5个月。</li>
					<li><em>3</em>一年预约低于60次、可和门店申请再延长3个月时间</li>
					<li><em>4</em>会员卡不许转售、退还！</li>		
              		<li><em>5</em>该门店如果不经营需提前1个月通知会员、并按排退款！退款金额按实付金额除以12个月、再乘以所剩时间的6折退还！</li>
             		<li><em>6</em>第二年续会5.8折尊享；第三年续会4.8折尊享！</li>				
				<php>}</php>
              
               <php>if($info['type']==4){</php> 
					<li><em>1</em>会员卡仅限本人和实名登记家属实用；</li>
              		<li><em>2</em>怀孕、搬家等特殊请况可和门店申请延长时间，最多5个月。</li>
					<li><em>3</em>一年预约低于60次、可和门店申请再延长3个月时间！</li>
					<li><em>4</em>会员卡不许转售、退还！</li>
              		<li><em>5</em>该门店如果不经营需提前1个月通知会员、并按排退款！退款金额按实付金额除以12个月、再乘以所剩时间的6折退还！结束股东分红权益！</li>
             		<li><em>6</em>第二年续会5.8折尊享；第三年续会4.8折尊享！</li>
             		<li><em>7</em>每季度参与门店35%（10名）的分红权！并拥有门店财务知情权！</li>
				<php>}</php> 
        </ul>
    </div>
</div>
<div class="cost" style="float: left; width: 100%;">

    <div class="cost1"><span>有效期</span><span>{:date('Y-m-d',time())}&nbsp;至&nbsp;{$end_time}</span></div>

    <div class="payway">
        <div class="wxpay way">
            <img src="__TMPL__/public/order/img/wx.png"/>
            <span>微信支付</span>
            <i><img src="__TMPL__/public/order/img/icon_radio3.png" class="fal" style="display: none;"/>
                <img src="__TMPL__/public/order/img/icon_radio4.png"  class="tru"/>
            </i></div>
    </div>
</div>
<div class="total">
    <div>应付：<span>￥{$info.price}</span></div>
    <div class="to_pay" style="background-color: #edda8b;">立即支付</div>
</div>
</body>

<input type="hidden" id="address_list" value="{$info.card_id}">
<script>
    $(function () {
        $('.to_pay').click(function () {
            var gudong={$gundong};
            var card_id="{$info.card_id}";
            var user_card_type={$card_type};
            var card_type={$info['type']};

            if(user_card_type!=0){
                layer.open({
                    content: '已有会员卡，购买新卡会导致旧会员卡无法使用，是否继续？'
                    ,btn: ['继续下单', '取消']
                    ,yes: function(index){
                        layer.close(index);
                        if(gudong>10&&card_type==4){
                            layer.open({
                                content: '股东家庭年卡已售光！'
                                ,skin: 'msg'
                                ,time: 2 //2秒后自动关闭
                            });
                        }else{
                            $.ajax({
                                type: "POST",
                                url: "{:url('shop/order/dopay_card')}",
                                data: {
                                    card_id:card_id
                                },
                                dataType: "json",
                                success: function (data) {
                                  layer.open({
                                      content: data.msg
                                      ,skin: 'msg'
                                      ,time: 2 //2秒后自动关闭
                                  });
                                  
                                    if(data.code==1){
                                        location.href=data.url;
                                    }
                                }
                            })

                        }

                    }
                });
            }else{
                if(gudong>10&&card_type==4){
                    layer.open({
                        content: '股东家庭年卡已售光！'
                        ,skin: 'msg'
                        ,time: 2 //2秒后自动关闭
                    });
                }else{
                    $.ajax({
                        type: "POST",
                        url: "{:url('shop/order/dopay_card')}",
                        data: {
                            card_id:card_id
                        },
                        dataType: "json",
                        success: function (data) {
                           layer.open({
                                      content: data.msg
                                      ,skin: 'msg'
                                      ,time: 2 //2秒后自动关闭
                                  });
                            if(data.code==1){
                                location.href=data.url;
                            }
                        }
                    })

                }
            }



        })
    })
</script>

</html>
